home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Add-Ons / After Dark / Twist 1.0b1 / PPC Read Me < prev    next >
Text File  |  1995-06-29  |  1KB  |  15 lines

  1. How to write PPC modules (Currently CodeWarrior C only).
  2. Prelimanary draft 6/5/95 by Andrew Armstrong
  3.  
  4. There are two parts to your PPC native module. The first part is a 68k code resource that 'thunks' the call from the engine to the PPC native shared library. The second is the PPC shared libary that does the cool stuff.
  5.  
  6. StubMod.π has two input files - StubMod.c & StubMod.π.rsrc. StubMod.c loads in the PPC shared library, establishes a link, and passes on all of the AfterDark messages to your code. StubMod.π.rsrc has the error string that's displayed when your code is run on a 68k machine. The output of the project is 'StubModWarrior', a compiled resource file that you should include in your 
  7.  
  8. JustOvals.π is an example of a simple PPC native module. The project type is a 'Shared Library' with a creator/type of "ADrk"/"ADgm". GraphicsModules.c is a good generic shell that you can use as a starting point for all of your modules. JustOvals.c is where the real work gets done. Besides these two 'c' files,  'StubModWarrior' is included and handles the transition from 68k to PPC.
  9.  
  10. 6/29/95 (aea)
  11. The "GraphicsModule_Types.h" file has been bracketed with the proper alignment pragmas.
  12.  
  13. If you have questions, please contact our tech support department.
  14.  
  15.